<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="UTF-8">
    <title>thymeleaf 标签</title>
</head>
<body>
<div th:include="header :: header"></div>
<p><strong>if each href include @ * $ object</strong></p>
<h3 th:text="${userModel.title}">Welcome to springboot</h3>
<div>
    <a th:href="@{/users/form}" >创建用户</a>
</div>
<table border="1">
    <thead>
    <tr>
        <td>ID</td>
        <td>Age</td>
        <td>Name</td>
    </tr>
    </thead>
    <tbody>
    <tr th:if="${userModel.userList.size()} eq 0">
        <td colspan="3">没有用户信息！！</td>
    </tr>
    <tr th:each="user : ${userModel.userList}">
        <td th:text="${user.id}">1</td>
        <td th:text="${user.age}">11</td>
        <td>
            <a th:href="@{'/users/' + ${user.id}}"
               th:text="${user.name}">wss</a></td>
    </tr>
    </tbody>

</table>

</body>
</html>